#include "MenuStack.h"

MenuStack* MenuStack::instance = NULL;

MenuStack::MenuStack() {
}

MenuStack::~MenuStack() {
}

MenuStack* MenuStack::getInstance(){
	if (instance == NULL) {
		instance = new MenuStack();
	}
	return instance;
}

void MenuStack::destroy() {
	if (instance != NULL) {
		delete instance;
		instance = NULL;
	}
}

Menu* MenuStack::getCurrent() {
	if (!stack.empty()) {
		return stack.back();
	}
	return NULL;
}

void MenuStack::push(Menu* menu) {
	stack.push_back(menu);
}
void MenuStack::pop() {
	//Menu* ultimo = stack.back();
	stack.pop_back();
	//delete ultimo;
}
